﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;
using System.Data.Linq;
using System.Runtime.Serialization;

namespace MobiMenu.Restaurant
{
    [Table(Name = "Dishes")]
    [DataContract(Namespace = "MobiMenu.Restaurant")]
    public class Dish
    {
        private bool _useDiscountPrice;
        [Column(Storage = "_useDiscountPrice")]
        [DataMember(Name = "useDiscountPrice")]
        public bool UseDiscountPrice
        {
            get
            {
                return _useDiscountPrice;
            }
            set
            {
                _useDiscountPrice = value;
            }
        }

        private double? _price;
        [Column(Storage = "_price")]
        [DataMember(Name = "price")]
        public double? Price
        {
            get
            {
                return _price;
            }
            set
            {
                _price = value;
            }
        }

        private string _name;
        [Column(Storage = "_name")]
        [DataMember(Name = "name")]
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                _name = value;
            }
        }

        private string _description;
        [Column(Storage = "_description")]
        [DataMember(Name = "description")]
        public string Description
        {
            get
            {
                return _description;
            }
            set
            {
                _description = value;
            }
        }

        private bool _showInMenu;
        [Column(Storage = "_showInMenu")]
        [DataMember(Name = "showInMenu")]
        public bool ShowInMenu
        {
            get
            {
                return _showInMenu;
            }
            set
            {
                _showInMenu = value;
            }
        }

        private string _imagePath;
        [Column(Storage = "_imagePath")]
        [DataMember(Name = "imagePath")]
        public string ImagePath
        {
            get
            {
                return _imagePath;
            }
            set
            {
                _imagePath = value;
            }
        }

        private double? _discountPrice;
        [Column(Storage = "_discountPrice")]
        [DataMember(Name = "discountPrice")]
        public double? DiscountPrice
        {
            get
            {
                return _discountPrice;
            }
            set
            {
                _discountPrice = value;
            }
        }

        private DishType _dishType;
        [Column(Storage = "_dishType")]
        [DataMember(Name = "dishType")]
        public DishType DishType
        {
            get
            {
                return _dishType;
            }
            set
            {
                _dishType = value;
            }
        }

        private int _id;
        [Column(IsPrimaryKey = true, Storage = "_id", IsDbGenerated = true)]
        [DataMember(Name = "id")]
        public int Id
        {
            get
            {
                return _id;
            }
            set
            {
                _id = value;
            }
        }
    }
}
